// ml:run = $bin < input
#include <cstdio>

int const maxn = 100007;
double const eps = 1e-6;
double a[maxn];
int n;

inline bool scan_lf(double &num)
{
        char in;double Dec=0.1;
        bool IsN=false,IsD=false;
        in=getchar();
        if(in==EOF) return false;
        while(in!='-'&&in!='.'&&(in<'0'||in>'9'))
                in=getchar();
        if(in=='-'){IsN=true;num=0;}
        else if(in=='.'){IsD=true;num=0;}
        else num=in-'0';
        if(!IsD){
                while(in=getchar(),in>='0'&&in<='9'){
                        num*=10;num+=in-'0';}
        }
        if(in!='.'){
                if(IsN) num=-num;
                return true;
        }else{
                while(in=getchar(),in>='0'&&in<='9'){
                        num+=Dec*(in-'0');Dec*=0.1;
                }
        }
        if(IsN) num=-num;
        return true;
}

int ceil(double x)
{
    int ret = x;
    if (x > ret + eps) return ret + 1;
    else return ret;
}

int main()
{
    int T; scanf("%d", &T);
    for (int ti = 1; ti <= T; ti++) {
        /* std::cout << "Case #" << ti << ": "; */
        printf("Case #%d: ", ti);
        scanf("%d", &n);
        /* std::cin >> n; */
        for (int i = 1; i <= n; i++)
            /* std::cin >> a[i]; */
            /* scanf("%lf", &a[i]); */
            scan_lf(a[i]);
        auto d = a[n] - a[n - 1];
        int ans = 1;
        for (int i = n - 1; i >= 1; i--) {
            auto td = a[i] - a[i - 1];
            if (td <= d) { d = td; ans++; }
            else {
                int t1 = ceil(td / d);
                double t2 = td / t1;
                ans += t1;
                d = t2;
            }
        }
        /* std::cout << ans << "\n"; */
        printf("%d\n", ans);
    }
}

